import Casehistory from '@/views/casehistory'
import Daozhen from '@/views/daozhen'
import Jiuzhen from '@/views/jiuzhen'
import Message from '@/views/message'
import Person from '@/views/person'
import NavBar from '@/components/NavBar.vue'
import TabBar from '@/components/TabBar.vue'
import mBar from '@/components/mbar.vue'
import jiuZhenBar from '@/components/jiuzhenbar.vue'
import rateBar from '@/components/rateBar.vue'
import personBar from '@/components/personBar.vue'
import Rate from '@/views/casehistory/rate.vue'

const routes = [
  {
    path: '/',
    redirect: '/daozhen'
  },
  {
    path: '/daozhen',
    name: 'Daozhen',
    components: {
      header: NavBar,
      default: Daozhen,
      footer: TabBar
    },
    meta: {
      title: '导诊',
      icon: '&#xe606;',
      isTab: true
    }

  },
  {
    path: '/jiuzhen',
    name: 'Jiuzhen',
    components: {
      header: jiuZhenBar,
      default: Jiuzhen,
      footer: TabBar
    },
    meta: {
      title: '就诊',
      icon: '&#xe66b;',
      isTab: true
    }

  },
  {
    path: '/message',
    name: 'Message',
    components: {
      header: mBar,
      default: Message,
      footer: TabBar
    },
    meta: {
      title: '信息',
      icon: '&#xe60c;',
      isTab: true
    }

  },
  {
    path: '/casehistory',
    name: 'Casehistory',
    components: {
      default: Casehistory,
      footer: TabBar
    },
    meta: {
      title: '病历',
      icon: '&#xe657;',
      isTab: true
    }
  },
  {
    path: '/person',
    name: 'Person',
    components: {
      header: personBar,
      default: Person,
      footer: TabBar
    },
    meta: {
      title: '个人',
      icon: '&#xe65a;',
      isTab: true
    }
  },

  {
    path: '/casehistory/rate:id',
    name: 'Rate',
    components: {
      header: rateBar,
      default: Rate
    },
    meta: {
      title: '评价'
    }
  }
]

export default routes
